<form method="post" class="form-x dux-form form-auto" id="form" action="{:U()}">
    <div class="panel dux-box  active">
        <div class="panel-head">
            <strong>操作权限</strong>
        </div>
        <div class="panel-body">
            <volist name="AdminPurvew" id="app" key="key">
                <volist name="app" id="list" key="listMode">
                <div class="form-group">
                    <div class="label">
                        <label>{$list['name']}</label>
                    </div>
                    <div class="field">
                        <div class="button-group checkbox">
                          <if condition="in_array($key.'_'.$listMode,(array)$AdminPurvewArray)">
                          <label class="button active"><input name="base_purview[]" value="{$key}_{$listMode}" type="checkbox" checked="checked"><span class="icon icon-check text-green"></span> 模块</label>
                          <else/>
                          <label class="button"><input name="base_purview[]" value="{$key}_{$listMode}" type="checkbox" ><span class="icon icon-check text-green"></span> 模块</label>
                          </if>
                          <volist name="list['auth']" id="val" key="action">
                              <if condition="in_array($key.'_'.$listMode.'_'.$action,(array)$AdminPurvewArray)">
                              <label class="button active"><input name="base_purview[]" value="{$key}_{$listMode}_{$action}" type="checkbox" checked="checked"><span class="icon icon-check text-green"></span> {$val}</label>
                              <else/>
                              <label class="button"><input name="base_purview[]" value="{$key}_{$listMode}_{$action}" type="checkbox" ><span class="icon icon-check text-green"></span> {$val}</label>
                              </if>
                          </volist>
                          
                        </div>
                    </div>
                </div>
              </volist>
            </volist>        
        </div>
        <div class="panel-head">
            <strong>菜单权限</strong>
        </div>
        <div class="panel-body">
            <volist name="AdminMenu['list']" id="top" key="topLabel" >
                <div class="form-group">
                    <div class="label">
                        <label>{$top['name']}</label>
                    </div>
                    <div class="field">
                        <div class="button-group checkbox">
                          <volist name="top['menu']" id="parent" key="parentLabel">
                              <if condition="in_array($top['name'].'_'.$parent['name'],(array)$AdminMenuArray)">
                              <label class="button active"><input name="menu_purview[]" value="{$top['name']}_{$parent['name']}" type="checkbox" checked="checked"><span class="icon icon-check text-green"></span> {$parent['name']}</label>
                              <else/>
                              <label class="button"><input name="menu_purview[]" value="{$top['name']}_{$parent['name']}" type="checkbox" ><span class="icon icon-check text-green"></span> {$parent['name']}</label>
                              </if>
                          </volist>
                        </div>
                    </div>
                </div>
            </volist>
        </div>
        <div class="panel-foot">
            <div class="form-button">
                <div id="tips"></div>
                <input type="hidden" name="group_id" type="hidden" value="{$info['group_id']}">
                <button class="button bg-main" type="submit">保存</button>
                <button class="button bg" type="reset">重置</button>
            </div>
        </div>
    </div>
</form>
<script>
    Do.ready('base', function () {
        $('#form').duxForm();
    });
</script>